<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>【工具分享】运营素材库提升创作效率</title>
    <!-- 引入html2canvas库用于保存长图 -->
    <script src="../js/html2canvas.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
        }
        
        body {
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.7;
            padding: 15px;
            max-width: 680px;
            margin: 0 auto;
            -webkit-font-smoothing: antialiased;
            position: relative;
        }
        
        .article-container {
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            margin-bottom: 30px;
            transition: transform 0.3s ease;
        }
        
        .article-container:hover {
            transform: translateY(-5px);
        }
        
        /* 功能按钮样式 */
        .tool-buttons {
            position: fixed;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 1000;
        }
        
        .tool-btn {
            background: #1890ff;
            color: white;
            border: none;
            border-radius: 20px;
            padding: 10px 15px;
            font-size: 14px;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(24, 144, 255, 0.3);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 120px;
        }
        
        .tool-btn:hover {
            background: #096dd9;
            transform: translateX(-5px);
            box-shadow: 0 5px 15px rgba(24, 144, 255, 0.4);
        }
        
        .tool-btn.save {
            background: #52c41a;
            box-shadow: 0 3px 10px rgba(82, 196, 26, 0.3);
        }
        
        .tool-btn.save:hover {
            background: #389e0d;
            box-shadow: 0 5px 15px rgba(82, 196, 26, 0.4);
        }
        
        /* 头部样式 */
        .article-header {
            padding: 30px 25px 20px;
            text-align: center;
            background: linear-gradient(135deg, #e6f7ff 0%, #f0fdff 100%);
            position: relative;
        }
        
        .article-header::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, #69c0ff, transparent);
        }
        
        .article-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 15px;
            line-height: 1.4;
            color: #0050b3;
            text-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        
        .article-subtitle {
            font-size: 16px;
            color: #096dd9;
            margin-bottom: 20px;
            font-weight: 400;
        }
        
        /* 封面图片 */
        .cover-image {
            width: 100%;
            height: auto;
            display: block;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 正文样式 */
        .article-content {
            padding: 30px 25px;
        }
        
        .hook-section {
            background: linear-gradient(120deg, #e6f7ff 0%, #f0fdff 100%);
            border-left: 4px solid #1890ff;
            padding: 20px;
            margin-bottom: 30px;
            font-size: 16px;
            border-radius: 0 8px 8px 0;
            box-shadow: 0 2px 10px rgba(24, 144, 255, 0.08);
            position: relative;
        }
        
        .hook-section::before {
            content: '"';
            font-size: 50px;
            color: #1890ff;
            opacity: 0.2;
            position: absolute;
            top: 10px;
            left: 15px;
            font-family: serif;
        }
        
        .content-section {
            margin-bottom: 35px;
        }
        
        .content-section h2 {
            font-size: 20px;
            margin-bottom: 18px;
            color: #0050b3;
            padding-bottom: 10px;
            border-bottom: 2px solid #e6f7ff;
            position: relative;
        }
        
        .content-section h2::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 80px;
            height: 2px;
            background: #1890ff;
        }
        
        .content-section p {
            margin-bottom: 18px;
            text-align: justify;
            font-size: 16px;
            color: #444;
        }
        
        .content-image {
            width: 100%;
            height: auto;
            margin: 20px 0;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s ease;
        }
        
        .content-image:hover {
            transform: scale(1.01);
        }
        
        .highlight {
            background: linear-gradient(120deg, #fff7e6 0%, #fffbf5 100%);
            padding: 18px 20px;
            border-left: 4px solid #ffa940;
            margin: 20px 0;
            font-size: 15px;
            border-radius: 0 8px 8px 0;
            box-shadow: 0 2px 10px rgba(255, 169, 64, 0.1);
        }
        
        .feature-box {
            background: #f6ffed;
            border: 1px solid #b7eb8f;
            border-radius: 6px;
            padding: 15px;
            margin: 20px 0;
            position: relative;
        }
        
        .feature-box::before {
            content: '✨';
            position: absolute;
            left: 15px;
            top: 15px;
            font-size: 18px;
        }
        
        .feature-content {
            margin-left: 30px;
        }
        
        .material-intro {
            background: linear-gradient(120deg, #f0f7ff 0%, #f8fdff 100%);
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
            border-left: 4px solid #1890ff;
        }
        
        .material-intro h3 {
            color: #1890ff;
            margin-bottom: 15px;
            font-size: 18px;
        }
        
        .benefits-list {
            margin: 20px 0;
            padding-left: 0;
        }
        
        .benefits-list li {
            margin-bottom: 10px;
            position: relative;
            padding-left: 30px;
            list-style-type: none;
        }
        
        .benefits-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: #52c41a;
            font-weight: bold;
            font-size: 16px;
            background: #f6ffed;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 结尾样式 */
        .article-footer {
            padding: 30px 25px;
            background: linear-gradient(135deg, #f0f5ff 0%, #f6fffc 100%);
            border-top: 1px solid #e8e8e8;
            text-align: center;
            position: relative;
        }
        
        .article-footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 3px;
            background: linear-gradient(to right, #1890ff, #52c41a);
            border-radius: 0 0 3px 3px;
        }
        
        .conclusion {
            margin-bottom: 25px;
            font-size: 16px;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        }
        
        .qrcode-section {
            margin-top: 30px;
            padding-top: 25px;
            border-top: 1px dashed #d9d9d9;
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        }
        
        .qrcode-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .qrcode {
            width: 140px;
            height: 140px;
            background: linear-gradient(135deg, #f0f2f5 0%, #e8e8e8 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #8c8c8c;
            border-radius: 8px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
            font-size: 14px;
        }
        
        .qrcode-info {
            text-align: left;
            max-width: 300px;
        }
        
        .qrcode-info h3 {
            font-size: 18px;
            margin-bottom: 10px;
            color: #1a1a1a;
        }
        
        .qrcode-info p {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
        }
        
        .follow-text {
            font-size: 14px;
            color: #8c8c8c;
            margin-top: 15px;
        }
        
        /* 装饰元素 */
        .decoration {
            position: absolute;
            width: 100px;
            height: 100px;
            opacity: 0.03;
            z-index: 0;
        }
        
        .decoration-1 {
            top: 20px;
            right: 20px;
            background: #1890ff;
            border-radius: 50%;
        }
        
        .decoration-2 {
            bottom: 40px;
            left: 30px;
            background: #52c41a;
            clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
        }
        
        /* 响应式调整 */
        @media (max-width: 580px) {
            .article-title {
                font-size: 22px;
            }
            
            .content-section h2 {
                font-size: 18px;
            }
            
            .article-content, .article-footer {
                padding: 20px 15px;
            }
            
            .qrcode-container {
                flex-direction: column;
                text-align: center;
            }
            
            .qrcode-info {
                text-align: center;
            }
            
            .tool-buttons {
                right: 10px;
            }
            
            .tool-btn {
                min-width: 100px;
                padding: 8px 12px;
                font-size: 13px;
            }
        }
        
        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .article-container {
            animation: fadeIn 0.6s ease-out;
        }
        
        /* 选择文本样式 */
        ::selection {
            background: rgba(24, 144, 255, 0.2);
            color: #000;
        }
    </style>
</head>
<body>
    <!-- 功能按钮 -->
    <div class="tool-buttons">
        <button class="tool-btn" id="fontIncrease">文字放大</button>
        <button class="tool-btn" id="fontDecrease">文字缩小</button>
        <button class="tool-btn save" id="saveImage">保存长图</button>
    </div>

    <div class="article-container" contenteditable="true">
        <!-- 装饰元素 -->
        <div class="decoration decoration-1"></div>
        <div class="decoration decoration-2"></div>
        
        <!-- 文章头部 -->
        <div class="article-header">
            <h1 class="article-title">【工具分享】运营素材库提升创作效率</h1>
            <p class="article-subtitle">告别素材混乱，一站式解决内容创作难题</p>
        </div>
        
        <!-- 封面图片 -->
        <img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-1.2.1&auto=format&fit=crop&w=700&q=80" alt="运营素材库" class="cover-image">
        
        <!-- 正文内容 -->
        <div class="article-content">
            <!-- 开头钩子 -->
            <div class="hook-section">
                <p>你是否曾经为了找一个合适的图标而翻遍整个电脑？是否因为排版不美观而反复修改内容？运营素材库正是为解决这些问题而生，让内容创作变得高效而愉悦。</p>
            </div>
            
            <!-- 正文部分 -->
            <div class="content-section">
                <h2>一、什么是运营素材库？</h2>
                <p>运营素材库是一款为内容创作者提供全方位支持的素材管理与创作辅助平台。这里汇聚了丰富多样的素材资源，数字标号、分割符号等能满足内容排版的精细需求；文字边框、区块工具可助力创作者打造独具风格的内容版式。</p>
                <img src="https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-1.2.1&auto=format&fit=crop&w=700&q=80" alt="素材库界面" class="content-image">
                <p>同时，还配备运营笔记、运营指南等实用模板，以及情感、知识、科普等多类通用模板，覆盖不同创作场景，让创作者能便捷取用素材、参考模板，高效产出优质内容。</p>
                
                <div class="feature-box">
                    <div class="feature-content">
                        <strong>核心价值：</strong>一站式解决内容创作者的素材管理、排版设计和模板参考需求，大幅提升创作效率。
                    </div>
                </div>
            </div>
            
            <div class="content-section">
                <h2>二、运营素材库的核心功能</h2>
                <p>1. <strong>丰富的素材资源库</strong>：涵盖图标、分割线、数字标号等各类排版元素，满足精细化排版需求。</p>
                
                <p>2. <strong>专业的版式设计工具</strong>：提供文字边框、区块工具等功能，帮助创作者打造专业美观的内容版式。</p>
                
                <div class="highlight">
                    <p>设计理念：好的版式设计不仅提升内容可读性，还能增强品牌识别度和专业感。</p>
                </div>
                
                <p>3. <strong>实用的内容模板</strong>：包含运营笔记、运营指南等专业模板，以及情感、知识、科普等多领域通用模板。</p>
                
                <p>4. <strong>场景化内容支持</strong>：针对不同创作场景提供针对性素材和模板，让内容创作更加精准高效。</p>
                
                <img src="https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-1.2.1&auto=format&fit=crop&w=700&q=80" alt="创作工具" class="content-image">
            </div>
            
            <div class="content-section">
                <h2>三、使用运营素材库的五大优势</h2>
                
                <ul class="benefits-list">
                    <li>大幅减少寻找素材的时间，提升创作效率</li>
                    <li>专业设计的模板和版式，提升内容质量</li>
                    <li>统一的设计风格，增强品牌一致性</li>
                    <li>覆盖多种场景，满足不同内容创作需求</li>
                    <li>持续更新的资源库，紧跟设计趋势</li>
                </ul>
                
                <div class="highlight">
                    <p>效率提升：据用户反馈，使用运营素材库后，内容创作时间平均缩短40%，同时内容质量显著提升。</p>
                </div>
            </div>
            
            <div class="content-section">
                <h2>四、适用人群与场景</h2>
                <p>运营素材库特别适合以下人群：</p>
                
                <ul class="benefits-list">
                    <li>新媒体运营人员</li>
                    <li>内容创作者和博主</li>
                    <li>市场营销人员</li>
                    <li>企业品牌宣传人员</li>
                    <li>需要频繁制作内容的个人或团队</li>
                </ul>
                
                <p>无论是日常推文、活动海报、产品介绍还是品牌宣传，运营素材库都能提供合适的素材和模板支持。</p>
                
                <div class="material-intro">
                    <h3>素材库核心价值</h3>
                    <p>运营素材库是一款为内容创作者提供全方位支持的素材管理与创作辅助平台。这里汇聚了丰富多样的素材资源，数字标号、分割符号等能满足内容排版的精细需求；文字边框、区块工具可助力创作者打造独具风格的内容版式。同时，还配备运营笔记、运营指南等实用模板，以及情感、知识、科普等多类通用模板，覆盖不同创作场景，让创作者能便捷取用素材、参考模板，高效产出优质内容。</p>
                </div>
            </div>
        </div>
        
        <!-- 文章结尾 -->
        <div class="article-footer">
            <div class="conclusion">
                <p>好的工具能让创作事半功倍。运营素材库通过提供丰富的素材资源和专业的设计模板，帮助内容创作者提升效率、保证质量，让创意更好地落地实现。</p>
            </div>
            
            <div class="qrcode-section">
                <div class="qrcode-container">
                    <div class="qrcode">
                        <img src="" style="width:100%;" />
                    </div>
                    <div class="qrcode-info">
                        <h3>运营工具箱</h3>
                        <p>专注提升运营效率与内容质量</p>
                        <p>每周分享实用工具与运营技巧</p>
                    </div>
                </div>
                <p class="follow-text">长按识别二维码，获取更多运营干货与工具推荐</p>
            </div>
        </div>
    </div>

    <script>
        // 文字大小控制
        let currentFontSize = 16;
        const minFontSize = 12;
        const maxFontSize = 24;
        
        // 获取需要调整文字大小的元素
        const contentElements = document.querySelectorAll('.article-content p, .article-content li, .hook-section, .highlight, .feature-content, .material-intro p');
        
        // 文字放大功能
        document.getElementById('fontIncrease').addEventListener('click', function() {
            if (currentFontSize < maxFontSize) {
                currentFontSize += 1;
                updateFontSize();
                showMessage(`文字已放大: ${currentFontSize}px`);
            } else {
                showMessage('文字已放大到最大值');
            }
        });
        
        // 文字缩小功能
        document.getElementById('fontDecrease').addEventListener('click', function() {
            if (currentFontSize > minFontSize) {
                currentFontSize -= 1;
                updateFontSize();
                showMessage(`文字已缩小: ${currentFontSize}px`);
            } else {
                showMessage('文字已缩小到最小值');
            }
        });
        
        // 更新文字大小
        function updateFontSize() {
            contentElements.forEach(element => {
                element.style.fontSize = `${currentFontSize}px`;
            });
        }
        
        // 保存为长图功能
        document.getElementById('saveImage').addEventListener('click', function() {
            const button = this;
            const originalText = button.textContent;
            
            // 显示保存中状态
            button.textContent = '生成中...';
            button.disabled = true;
            
            // 使用html2canvas将文章内容转换为图片
            html2canvas(document.querySelector('.article-container'), {
                scale: 2, // 提高图片质量
                useCORS: true, // 允许跨域图片
                scrollY: -window.scrollY // 确保捕获整个元素
            }).then(canvas => {
                // 将canvas转换为图片URL
                const imageURL = canvas.toDataURL('image/png');
                
                // 创建下载链接
                const downloadLink = document.createElement('a');
                downloadLink.href = imageURL;
                downloadLink.download = '运营素材库工具分享.png';
                
                // 触发下载
                document.body.appendChild(downloadLink);
                downloadLink.click();
                document.body.removeChild(downloadLink);
                
                // 恢复按钮状态
                button.textContent = originalText;
                button.disabled = false;
                
                showMessage('长图已保存，请查看下载文件夹');
            }).catch(error => {
                console.error('保存长图失败:', error);
                button.textContent = originalText;
                button.disabled = false;
                showMessage('保存失败，请重试');
            });
        });
        
        // 显示提示消息
        function showMessage(message) {
            // 移除已存在的消息
            const existingMessage = document.querySelector('.message-toast');
            if (existingMessage) {
                existingMessage.remove();
            }
            
            // 创建新消息
            const messageElement = document.createElement('div');
            messageElement.className = 'message-toast';
            messageElement.textContent = message;
            messageElement.style.cssText = `
                position: fixed;
                top: 20px;
                left: 50%;
                transform: translateX(-50%);
                background: rgba(0, 0, 0, 0.8);
                color: white;
                padding: 10px 20px;
                border-radius: 20px;
                z-index: 10000;
                font-size: 14px;
                transition: opacity 0.3s;
            `;
            
            document.body.appendChild(messageElement);
            
            // 3秒后淡出并移除
            setTimeout(() => {
                messageElement.style.opacity = '0';
                setTimeout(() => {
                    if (messageElement.parentNode) {
                        messageElement.parentNode.removeChild(messageElement);
                    }
                }, 300);
            }, 3000);
        }
        
        // 添加简单的交互效果
        document.addEventListener('DOMContentLoaded', function() {
            // 图片懒加载效果
            const images = document.querySelectorAll('.content-image');
            images.forEach(img => {
                img.addEventListener('load', function() {
                    this.style.opacity = 1;
                });
                img.style.opacity = 0;
                img.style.transition = 'opacity 0.5s ease';
            });
            
            // 清单项点击效果
            const listItems = document.querySelectorAll('.benefits-list li');
            listItems.forEach(item => {
                item.addEventListener('click', function() {
                    this.style.backgroundColor = '#f0f5ff';
                    setTimeout(() => {
                        this.style.backgroundColor = '';
                    }, 500);
                });
            });
        });
    </script>
</body>
</html>